class BooksController < ApplicationController
  def index
    @books = Book.all
  end
  def new

  end
  def create
    # Book.create(:name => params[:q])
    if params.has_key?(:q)
      Book.create(name: params[:q])
    else
    end
  end
  def update
    # @book = Book.find(params[:id])
    # if @book.update(book_params)
    #   redirect_to(@book)
    # else
    #   render "edit"
    # end

  end

  def show

  end
end
